<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>Home Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../css/adminStyle.css" type="text/css" />
<script language="JavaScript" type="text/javascript">
//--------------- LOCALIZEABLE GLOBALS ---------------
var d=new Date();
var monthname=new Array("1","2","3","4","5","6","7","8","9","10","11","12");
//Ensure correct for language. English is "January 1, 2004"
var TODAY = d.getFullYear() + "年" + monthname[d.getMonth()] + "月" + d.getDate() + "日";
//---------------   END LOCALIZEABLE   ---------------
</script>
</head>
<body bgcolor="#F4FFE4">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr bgcolor="#D5EDB3">
    <td colspan="3" rowspan="2"><img src="../image/mm_health_photo.jpg" alt="Header image" width="382" height="101" border="0" /></td>
    <td height="50" colspan="3" id="logo" valign="bottom" align="center" nowrap="nowrap">内蒙古工业大学</td>
    <td width="368">&nbsp;</td>
  </tr>

  <tr bgcolor="#D5EDB3">
    <td height="51" colspan="3" id="tagline" valign="top" align="center">成绩管理系统</td>
	<td width="368">&nbsp;</td>
  </tr>

  <tr>
    <td colspan="7" bgcolor="#5C743D"><img src="../image/mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
  </tr>

  <tr>
    <td colspan="7" bgcolor="#99CC66" background="../image/mm_dashed_line.gif"><img src="../image/mm_dashed_line.gif" alt="line decor" width="4" height="3" border="0" /></td>
  </tr>

  <tr bgcolor="#99CC66">
  	<td colspan="7" id="dateformat" height="20">&nbsp;&nbsp;<script language="JavaScript" type="text/javascript">
      document.write(TODAY);	</script>	
  	  教师：${loginedUser.name } 您好！ 欢迎使用成绩管理系统</td>
  </tr>
  <tr>
    <td colspan="7" bgcolor="#99CC66" background="../image/mm_dashed_line.gif"><img src="../image/mm_dashed_line.gif" alt="line decor" width="4" height="3" border="0" /></td>
  </tr>

  <tr>
    <td colspan="7" bgcolor="#5C743D"><img src="../image/mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
  </tr>

 <tr>
    <td width="165" valign="top" bgcolor="#5C743D">
	<table border="0" cellspacing="0" cellpadding="0" width="165" id="navigation">
        <tr>
          <td width="165">&nbsp;<br />
		 &nbsp;<br /></td>
        </tr>
		<tr>
          <td width="165"><a href="<%=basePath %>teacher/index.do" class="navText">管理首页</a></td>
        </tr>
        <tr>
          <td width="165"><a href="<%=basePath %>teacher/showInfo.do" class="navText">基本信息</a></td>
        </tr>
        <tr>
          <td width="165"><a href="<%=basePath %>teacher/showCourse.do" class="navText">课程查询</a></td>
        </tr>
        <tr>
          <td width="165"><a href="<%=basePath %>teacher/changePassword.do" class="navText">修改密码</a></td>
        </tr>
        <tr>
          <td width="165"><a href="<%=basePath %>logout.do" class="navText">退出登录</a></td>
        </tr>
      </table>
  <br />
  	&nbsp;<br />
  	&nbsp;<br />
  	&nbsp;<br /> 	</td>
    <td colspan="6" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td><div align="center">
          <table width="100%" border="1" cellspacing="0" cellpadding="0">
            <tr>
              <td><div align="center">课程名称</div></td>
             
              <td><div align="center">可选状态</div></td>
              <td><div align="center">结课状态</div></td>
              <td><div align="center">操作</div></td>
            </tr>
            <c:forEach items="${courses}" var="course">
            <tr>
              <td><div align="center">${course.name }</div></td>
              
              <td><div align="center">
              	<c:if test="${!course.chooseStatus}">不</c:if>可选
              </div></td>
              <td><div align="center">
              	<c:if test="${course.finish}">
              		已结课
              	</c:if>
              	<c:if test="${!course.finish}">
              		未结课
              	</c:if>
              </div></td>
              <td><div align="center">
              	<c:if test="${!course.chooseStatus}">
              		<a href="<%=basePath %>teacher/importResult.do?method=downStudentList&courseId=${course.id }">下载学生名单 / </a>
              	</c:if>
              	<a href="<%=basePath %>teacher/showCourseInfo.do?courseId=${course.id }">查看详情</a>
              </div></td>
            </tr>
            </c:forEach>
            <tr>
            <td colspan="4">
            
              <div align="center">
              <c:if test="${page!=1}">
    			<a href="<%=basePath%>teacher/showCourse.do?page=1">首页</a>
    			<a href="<%=basePath%>teacher/showCourse.do?page=${page-1}">上一页</a>
    		</c:if>
    		<c:if test="${page==1}">
    			首页 上一页
    		</c:if>
    		第<c:out value="${page}"/>/<c:out value="${pageCount}"/>页
    		<c:if test="${page!=pageCount}">
	    		<a href="<%=basePath%>teacher/showCourse.do?page=${page+1}">下一页</a> 
	    		<a href="<%=basePath%>teacher/showCourse.do?page=${pageCount}">尾页</a>
    		</c:if>
    		<c:if test="${page==pageCount}">
    			下一页 尾页
    		</c:if>
              </div></td>
            </tr>
          </table>
        </div></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td width="165">&nbsp;</td>
    <td width="359">&nbsp;</td>
    <td width="158">&nbsp;</td>
    <td width="154">&nbsp;</td>
    <td width="20">&nbsp;</td>
    <td width="78">&nbsp;</td>
	<td width="368">&nbsp;</td>
  </tr>
</table>
</body>
</html>
